package quq.missq.activity;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;

import quq.missq.BaseActivity;
import quq.missq.Constants;
import quq.missq.R;

/**
 * Created by wcx on 2015/9/21.
 */
public class CommonQuesActivity extends BaseActivity{
    private WebView wb_carousel;
    private TextView tv_usertreaty;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detailaboutus);
        tv_usertreaty = (TextView) findViewById(R.id.tv_usertreaty);
        tv_usertreaty.setText("常见问题");
        init();
        findViewById(R.id.iv_back).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
    private String aboutLink= Constants.USER_HELP;
    private void init(){
        wb_carousel = (WebView) findViewById(R.id.wb_carousel);
        WebSettings webSettings =wb_carousel .getSettings();
        webSettings.setUseWideViewPort(true);
        webSettings.setLoadWithOverviewMode(true);
        webSettings.setJavaScriptEnabled(true);
        wb_carousel.loadUrl(aboutLink);
        wb_carousel.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
    }
}
